<template>
	<!-- 打手或陪玩 -->
	<view class="selectPerson-box">
		<uni-segmented-control :current="current" :values="items" style-type="button" active-color="#007aff"
			@clickItem="onClickItem" />
			
		<view class="search-box">
			<input type="text" placeholder="请输入打手名称" style="font-size: 24rpx;"/>
		</view>
		
		<view class="userList">
			<view class="userItem" v-for="item in 10" @click="gotoPath('/pages/selectPersonInfo/selectPersonInfo')">
				<view class="userImage">
					<image src="https://static.haiqigame.com/uploads/20251013/d4fbf38e9ea926caf04aea92efb08a02.jpg" mode="widthFix"></image>
				</view>
				<view class="userInfo">
					<view class="userName">
						<text class="name">
							青龙电竞-须尽欢
						</text>
						<view class="status">
							在线
						</view>
					</view>
					<view class="infos">
						<text class="sex">
							男
						</text>
						<text class="city">
							湖南
						</text>
					</view>
					<view class="tags">
						<text class="tag">三角洲行动</text>
					</view>
					<view class="userBtn">
						<view class="btn">
							立即下单
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items: ['排行榜', '打手专区', '陪玩专区'],
				current: 0,
			}
		},
		methods: {
			onClickItem(e) {
				if (this.current !== e.currentIndex) {
					this.current = e.currentIndex
				}
			},
			gotoPath(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.selectPerson-box{
		box-sizing: border-box;
		padding: 20rpx;
		.search-box{
			height: 70rpx;
			background-color: #fff;
			border-radius: 140rpx;
			margin: 20rpx 0px;
			display: flex;
			align-items: center;
			box-sizing: border-box;
			padding: 0px 30rpx;
		}
		
		.userList{
			.userItem{
				display: flex;
				background-color: #fff;
				box-sizing: border-box;
				padding: 20rpx;
				border-radius: 16rpx;
				margin-bottom: 20rpx;
				.userImage{
					width: 180rpx;
					height: 180rpx;
					font-size: 0px;
					margin-right: 20rpx;
					border-radius: 8px;
					overflow: hidden;
				}
				.userInfo{
					flex: 1;
					font-size: 24rpx;
					.userName{
						display: flex;
						align-items: center;
						justify-content: space-between;
						.name{
							font-size: 28rpx;
							font-weight: 700;
						}
						.status{
							border: 1px #999 solid;
							color: #999;
							padding: 2px 20rpx;
							font-size: 18rpx;
							border-radius: 40rpx;
						}
					}
					.infos{
						margin: 15rpx 0px;
						.sex{
							
						}
						
						.city{
							
						}
					}
					.tags{
						font-size: 16rpx;
						.tag{
							background-color: #007aff;
							color: #fff;
							padding: 2px 10rpx;
							border-radius: 4px;
						}
						
					}
					.userBtn{
						display: flex;
						justify-content: flex-end;
						.btn{
							padding: 4px 30rpx;
							background-color: #007aff;
							color: #fff;
							font-size: 24rpx;
							border-radius: 4px;
						}
					}
				}
			}
		}
	}
</style>